<?php

/**
 * Login
 * 
 * Controller dealing with the authentication to the app.
 * 
 * @author Oliver Schwarz <oliver.schwarz@gmail.com>
 * @package Controller
 */
class Login
{

        /**
         * Run controller
         */
        public function run()
        {

                if (isset($_POST['username']) && isset($_POST['password'])):
                        if (Auth::authenticate(Util::sanitize($_POST['username']),Util::sanitize($_POST['password'])) === true):
                                Util::go('/');
                        endif;
                endif;

        }

}

?>